/**
 * 通知管理相关接口
 */
import request from '@/utils/request'

// 获取通知列表
export function getNotificationList(params) {
  return request({
    url: '/notification/list',
    method: 'get',
    params
  })
}

// 创建通知
export function createNotification(data) {
  return request({
    url: '/notification/create',
    method: 'post',
    data
  })
}

// 更新通知
export function updateNotification(id, data) {
  return request({
    url: `/notification/${id}`,
    method: 'put',
    data
  })
}

// 删除通知
export function deleteNotification(id) {
  return request({
    url: `/notification/${id}`,
    method: 'delete'
  })
}

// 发布通知
export function publishNotification(id) {
  return request({
    url: `/notification/${id}/publish`,
    method: 'post'
  })
}

// 获取未读通知数量
export function getUnreadCount() {
  return request({
    url: '/notification/unread/count',
    method: 'get'
  })
}

// 标记通知为已读
export function markAsRead(id) {
  return request({
    url: `/notification/${id}/read`,
    method: 'post'
  })
} 